/*****************************************************************************
* ui_sys_footer.h: Copyright 2023 (c) CoreLink
* Desc:           
* 
* Author: Jeanne
* Date: 2023-09-07 11:36:54
* Notes: 
* 
* ---------------------------------------------------------------------------
* LastEditors: 
* LastEditTime: 
*****************************************************************************/
#ifndef UI_SYS_FOOTER_H_
#define UI_SYS_FOOTER_H_

#ifdef __cplusplus
extern "C"
{
#endif
/*------------------------------- Includes ----------------------------------*/
#include "my_conf.h"
#include "lvgl.h"
/*----------------------------- 全局定义 ------------------------------*/

/*----------------------------- 全局类型 -----------------------------*/
typedef void (*footer_event_cb_t)(int index, void *cb_arg);
typedef struct ui_sys_footer_info_t_
{
    lv_obj_t *parent;
    lv_obj_t *cont;
    int old_index;
    footer_event_cb_t footer_cb;
    void *cb_arg;
    unsigned item_num;
    lv_obj_t * item_list[0];  //柔性数组？
} ui_sys_footer_info_t;
/*----------------------------- 全局外部变量 --------------------------*/

/*------------------------ 全局函数原型 -----------------------*/
ui_sys_footer_info_t *ui_sys_footer_create(lv_obj_t *parent, uint8_t size, footer_event_cb_t footer_cb, void *cb_arg);
int ui_sys_footer_show(ui_sys_footer_info_t *info);
int ui_sys_footer_delete(ui_sys_footer_info_t *info);
int ui_sys_footer_select(ui_sys_footer_info_t *info, int index);
int ui_sys_footer_set_bg_color(ui_sys_footer_info_t *info, lv_color_t color);

#ifdef __cplusplus
}
#endif
#endif//UI_SYS_FOOTER_H_

